package com.itic.appbase.framework.type;

public enum OrderType {
	Paying("1","待付款"),Payed("2","已付款"),Sending("3","待发货"),Sended("4","已发货"),Judgeing("5","待评价"),Exchangeing("6","换货中."),Exchanged("7","换货成功"),
	ReturnGoodsing("8","退货中"),
	ReturnGoodsed("9","退货成功"),Repairing("10","维修中"),Repaired("11","维修成功"),Refunding("12","退款中"),
	Refunded("13","退款成功"),OrderException("14","订单异常"),loced("15","锁定订单"),close("16","关闭订单"),finished("17","已完成");
	
	private String state;
	
	private String name;

	 OrderType(String state, String name) {
		this.state = state;
		this.name = name;
	}

	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	public static OrderType getOrderType(String state){
		OrderType orderType = null;
		switch(state){
		case"1":
			orderType = OrderType.Paying;
			break;
		case"2":
			orderType = OrderType.Payed;
			break;
		case"3":
			orderType = OrderType.Sending;
			break;
		case"4":
			orderType = OrderType.Sended;
			break;
		case"5":
			orderType = OrderType.Judgeing;
			break;
		case"6":
			orderType = OrderType.Exchangeing;
			break;
		case"7":
			orderType = OrderType.Exchanged;
			break;
		case"8":
			orderType = OrderType.ReturnGoodsing;
			break;
		case"9":
			orderType = OrderType.ReturnGoodsed;
			break;
		case"10":
			orderType = OrderType.Repairing;
			break;
		case"11":
			orderType = OrderType.Repaired;
			break;
		case"12":
			orderType = OrderType.Refunding;
			break;
		case"13":
			orderType = OrderType.Refunded;
			break;
		case"14":
			orderType = OrderType.OrderException;
			break;
		case"15":
			orderType = OrderType.loced;
			break;
		case"16":
			orderType = OrderType.close;
			break;
		case"17":
			orderType = OrderType.finished;
			break;
		default:break;
		}
		return orderType;
	}
}
